
DEBUG?= -g
CFLAGS?= -O0 -Wall -W -DSDS_ABORT_ON_OOM
CCOPT= $(CFLAGS)

OBJ=web-socket.o web-server.o
SEL=web-socket.o web-select.o

PRGNAME=server

all: select

web-socket.o: web-socket.c web-socket.h
web-server.o: web-server.c web-socket.h
web-select.o: web-select.c web-socket.h

server: $(OBJ)
	$(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)

select: $(SEL)
	$(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(SEL)

clean:
	rm -rf $(PRGNAME) *.o
